﻿using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Text;

namespace Common.Aliyun
{
    /// <summary>
    /// 阿里云行为验证码扩展方法
    /// </summary>
    public static class AliyunCaptchaServiceCollectionExtentions
    {
        /// <summary>
        /// 添加阿里云行为验证码实现，阿里云行为验证码有使用到 IHttpContextAccessor 和 IRedisCache，请务必在依赖容器注入这两个对象
        /// </summary>
        /// <param name="services"></param>
        public static void AddAliyunCaptcha(this IServiceCollection services)
        {
            services.AddSingleton<IBehaviorCaptcha, AliyunCaptchaVerification>();
        }
    }
}
